package com.itbaizhan.controller;

import com.itbaizhan.service.QueryGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author spf
 * @date 2024/3/12
 * @time 16:30
 */
@RestController
public class FlowLimitController {

    @Autowired
    private QueryGoods queryGoods;

    @GetMapping("/testA")
    public String testA(){
        return "------------testA";
    }

    @GetMapping("/testB")
    public String testB(){
        return "------------testB";
    }

    @GetMapping("/query")
    public String queryOrder() {
        // 查询商品
        queryGoods.queryGoods();
        // 查询订单
        System.out.println("查询订单");
        return "查询订单成功";
    }

    @GetMapping("/save")
    public String save() {
        // 查询商品
        queryGoods.queryGoods();
        // 查询订单
        System.out.println("添加订单");
        return "添加订单成功";
    }


}
